package com.fch.sdlibrary.mapper;

import com.fch.sdlibrary.entity.Book;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @program: sdlibrarySpring
 * @description: 图书Mapper接口
 * @CreatedBy: fch
 * @create: 2022-05-04 19:49
 **/
@Mapper
public interface BookMapper {
    List<Book> queryAllBooks();

    List<Book> searchBookByNameAndClazz(Book book);

    List<Book> searchBookByIsbn(Book book);

    Book queryBookById(String id);

    int doBorrowFromBook(String bookId);

    int doRemandFromBook(String bookId);

    int addToBook(Book book);

    int updateImg(Book book);

    int updateBook(Book book);
}
